This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
## Installs
install.packages("stm")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/stm_1.3.6.tgz'
Content type 'application/x-gzip' length 3415835 bytes (3.3 MB)
==================================================
downloaded 3.3 MB
The downloaded binary packages are in
/var/folders/82/tf8g1fnn6f19cftfxkss0w9c0000gn/T//RtmphRez9l/downloaded_packages
install.packages("quanteda")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/quanteda_3.3.0.tgz'
Content type 'application/x-gzip' length 3943481 bytes (3.8 MB)
==================================================
downloaded 3.8 MB
The downloaded binary packages are in
/var/folders/82/tf8g1fnn6f19cftfxkss0w9c0000gn/T//RtmphRez9l/downloaded_packages
install.packages("spacyr")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/spacyr_1.2.1.tgz'
Content type 'application/x-gzip' length 268022 bytes (261 KB)
==================================================
downloaded 261 KB
The downloaded binary packages are in
/var/folders/82/tf8g1fnn6f19cftfxkss0w9c0000gn/T//RtmphRez9l/downloaded_packages
install.packages("wordcloud")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/wordcloud_2.6.tgz'
Content type 'application/x-gzip' length 281705 bytes (275 KB)
==================================================
downloaded 275 KB
The downloaded binary packages are in
/var/folders/82/tf8g1fnn6f19cftfxkss0w9c0000gn/T//RtmphRez9l/downloaded_packages
## Imports
library(jsonlite)
library(stm)
Registered S3 method overwritten by 'data.table':
method from
print.data.table
stm v1.3.6 successfully loaded. See ?stm for help.
Papers, resources, and other materials at structuraltopicmodel.com
library(quanteda)
Package version: 3.3.0
Unicode version: 14.0
ICU version: 70.1
Parallel computing: 8 of 8 threads used.
See https://quanteda.io for tutorials and examples.
library(spacyr)
library(stringr)
library(wordcloud)
Loading required package: RColorBrewer
library(ggplot2)
gender_func <- function(gender_label){
if(gender_label == "woman"){
return("Female")
} else if(gender_label == "man") {
return("Male")
} else {
return("other")
}
}
w_vs <- function(eth_label){
if(eth_label == 'white'){
return("White")
} else {
return("Not White")
}
}
a_vs <- function(eth_label){
if(eth_label == 'asian'){
return("Asian")
} else {
return("Not Asian")
}
}
b_vs <- function(eth_label){
if(eth_label == 'black'){
return("African American")
} else {
return("Not African American")
}
}
h_vs <- function(eth_label){
if(eth_label == 'hispanic'){
return("Hispanic")
} else {
return("Not Hispanic")
}
}
# survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2345.csv")
# survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2_p4_p5_p6_p7.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p4_5_6_7.csv")
survey_meta$gender <- sapply(survey_meta$gender, gender_func)
# survey_meta$w_vs <- sapply(survey_meta$race, w_vs)
# survey_meta$a_vs <- sapply(survey_meta$race, a_vs)
# survey_meta$b_vs <- sapply(survey_meta$race, b_vs)
# survey_meta$h_vs <- sapply(survey_meta$race, h_vs)
# survey_meta <- survey_meta[, c("text", "gender", "race")]
summary(survey_meta)
X Unnamed..0 gender race tok total.tok
Min. : 0.0 Min. : 0.00 Length:1496 Length:1496 Min. : 58.74 Min. :27.00
1st Qu.: 70.0 1st Qu.: 99.75 Class :character Class :character 1st Qu.: 70.06 1st Qu.:28.00
Median :162.0 Median :199.50 Mode :character Mode :character Median : 82.94 Median :34.00
Mean :175.2 Mean :199.50 Mean : 80.70 Mean :32.17
3rd Qu.:275.0 3rd Qu.:299.25 3rd Qu.: 90.18 3rd Qu.:35.00
Max. :399.0 Max. :399.00 Max. :102.74 Max. :35.00
NA's :296 NA's :296
text reason w_vs a_vs b_vs
Length:1496 Length:1496 Length:1496 Length:1496 Length:1496
Class :character Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character Mode :character
h_vs
Length:1496
Class :character
Mode :character
head(survey_meta)
sapply(lapply(survey_meta, unique), length)
text gender race
1485 2 4
processed <- textProcessor(survey_meta$text, metadata=survey_meta[, c( "gender", "race")])
Building corpus...
Converting to Lower Case...
Removing punctuation...
Removing stopwords...
Removing numbers...
Stemming...
Creating Output...
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
Removing 418 of 1310 terms (418 of 36615 tokens) due to frequency
Your corpus now has 1440 documents, 892 terms and 36197 tokens.
sapply(lapply(processed$meta, unique), length)
gender race
2 4
temp_text <- survey_meta[-processed$docs.removed,]
length(temp_text)
[1] 3
model_depression_race <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + w_vs ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
Error in makeTopMatrix(prevalence, data) : Error creating model matrix.
This could be caused by many things including
explicit calls to a namespace within the formula.
Try a simpler formula.
model_depression_race_2 <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + race ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
Beginning Spectral Initialization
Calculating the gram matrix...
Finding anchor words...
.........................
Recovering initialization...
........
Initialization complete.
..........................................................................................................
Completed E-Step (1 seconds).
Completed M-Step.
Completing Iteration 1 (approx. per word bound = -4.877)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 2 (approx. per word bound = -4.707, relative change = 3.474e-02)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 3 (approx. per word bound = -4.656, relative change = 1.082e-02)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 4 (approx. per word bound = -4.635, relative change = 4.491e-03)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 5 (approx. per word bound = -4.625, relative change = 2.175e-03)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, also
Topic 3: job, stress, work, life, sourc
Topic 4: feel, like, life, anyth, depress
Topic 5: realli, dont, like, know, think
Topic 6: feel, make, famili, also, financi
Topic 7: realli, feel, parent, want, alway
Topic 8: feel, enough, like, good, depress
Topic 9: thing, feel, depress, can, caus
Topic 10: stress, worri, job, work, sourc
Topic 11: feel, never, like, find, job
Topic 12: feel, constant, like, black, racism
Topic 13: just, right, feel, realli, now
Topic 14: feel, thing, make, constant, last
Topic 15: feel, realli, main, just, job
Topic 16: feel, like, well, enough, good
Topic 17: feel, get, stuck, dont, like
Topic 18: realli, feel, just, sure, late
Topic 19: feel, thing, like, make, last
Topic 20: feel, like, just, hard, tire
Topic 21: stress, realli, feel, sourc, life
Topic 22: stress, worri, life, feel, also
Topic 23: overwhelm, deal, person, cope, lot
Topic 24: alway, cant, feel, worri, just
Topic 25: feel, like, depress, may, thing
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 6 (approx. per word bound = -4.619, relative change = 1.412e-03)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 7 (approx. per word bound = -4.614, relative change = 9.962e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 8 (approx. per word bound = -4.611, relative change = 7.578e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 9 (approx. per word bound = -4.608, relative change = 5.195e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 10 (approx. per word bound = -4.606, relative change = 4.067e-04)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, job
Topic 3: job, work, long, stress, hour
Topic 4: feel, like, life, live, anyth
Topic 5: realli, dont, think, know, man
Topic 6: make, worri, feel, money, financi
Topic 7: realli, want, parent, alway, famili
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, worri, job, work, sourc
Topic 11: never, feel, abl, find, job
Topic 12: constant, like, feel, black, racism
Topic 13: just, right, feel, realli, now
Topic 14: thing, feel, anoth, one, constant
Topic 15: main, feel, realli, late, just
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, feel, just, sure, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: stress, realli, take, health, sourc
Topic 22: worri, stress, futur, will, also
Topic 23: stress, overwhelm, can, deal, lot
Topic 24: alway, cant, keep, break, just
Topic 25: feel, like, depress, may, isol
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 11 (approx. per word bound = -4.605, relative change = 3.151e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 12 (approx. per word bound = -4.604, relative change = 2.402e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 13 (approx. per word bound = -4.603, relative change = 1.873e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 14 (approx. per word bound = -4.602, relative change = 1.591e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 15 (approx. per word bound = -4.602, relative change = 1.378e-04)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, job
Topic 3: job, long, work, hour, stress
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, know
Topic 6: make, worri, money, feel, financi
Topic 7: parent, realli, want, alway, hispan
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, work, job, sourc, worri
Topic 11: never, feel, abl, job, find
Topic 12: constant, like, black, racism, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, feel, one, relationship
Topic 15: main, feel, realli, work, late
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: realli, stress, take, health, mental
Topic 22: worri, futur, will, also, stress
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, alway, cant, break, just
Topic 25: feel, like, depress, isol, may
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 16 (approx. per word bound = -4.601, relative change = 1.303e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 17 (approx. per word bound = -4.600, relative change = 1.166e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 18 (approx. per word bound = -4.600, relative change = 1.082e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 19 (approx. per word bound = -4.600, relative change = 9.000e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 20 (approx. per word bound = -4.599, relative change = 7.671e-05)
Topic 1: feel, like, perfect, make, good
Topic 2: struggl, feel, find, depress, job
Topic 3: job, long, hour, work, stress
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, parent, alway, famili, realli
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, work, sourc, job, moment
Topic 11: never, abl, job, feel, find
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, feel, one, relationship
Topic 15: main, stress, realli, feel, work
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: realli, stress, take, health, mental
Topic 22: worri, futur, will, also, sure
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, cant, alway, break, just
Topic 25: feel, isol, like, depress, may
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 21 (approx. per word bound = -4.599, relative change = 6.319e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 22 (approx. per word bound = -4.599, relative change = 5.931e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 23 (approx. per word bound = -4.598, relative change = 4.147e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 24 (approx. per word bound = -4.598, relative change = 4.456e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 25 (approx. per word bound = -4.598, relative change = 4.105e-05)
Topic 1: feel, like, perfect, alway, make
Topic 2: struggl, feel, depress, find, job
Topic 3: job, long, hour, work, life
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, famili, parent, alway, realli
Topic 8: enough, feel, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, sourc, work, moment, job
Topic 11: never, abl, find, job, feel
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, one, feel, relationship
Topic 15: stress, main, realli, life, feel
Topic 16: feel, like, well, enough, pressur
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, what
Topic 19: feel, thing, make, last, like
Topic 20: feel, like, tire, just, hard
Topic 21: realli, take, health, stress, mental
Topic 22: worri, futur, will, also, sure
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, cant, break, alway, seem
Topic 25: feel, isol, depress, may, like
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 26 (approx. per word bound = -4.598, relative change = 4.110e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 27 (approx. per word bound = -4.598, relative change = 3.227e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 28 (approx. per word bound = -4.598, relative change = 2.559e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 29 (approx. per word bound = -4.597, relative change = 2.605e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 30 (approx. per word bound = -4.597, relative change = 1.845e-05)
Topic 1: feel, like, alway, perfect, time
Topic 2: struggl, feel, depress, job, find
Topic 3: job, long, hour, work, life
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, famili, parent, alway, realli
Topic 8: enough, feel, like, good, depress
Topic 9: thing, depress, feel, can, problem
Topic 10: stress, sourc, work, moment, job
Topic 11: never, abl, find, job, feel
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, one, relationship, feel
Topic 15: stress, main, realli, life, job
Topic 16: feel, like, well, enough, one
Topic 17: get, feel, like, stuck, dont
Topic 18: realli, sure, feel, what, just
Topic 19: feel, thing, make, last, like
Topic 20: feel, like, tire, just, hard
Topic 21: realli, take, health, mental, toll
Topic 22: worri, futur, will, also, life
Topic 23: stress, lot, can, deal, overwhelm
Topic 24: keep, cant, break, seem, everyth
Topic 25: feel, isol, may, depress, overwhelm
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 31 (approx. per word bound = -4.597, relative change = 1.369e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 32 (approx. per word bound = -4.597, relative change = 1.491e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Model Converged
model_depression <- stm::stm(
documents = out$documents,
K = 25,
prevalence =~ gender + race,
data=out$meta,
vocab = out$vocab,
max.em.its=75
)
Beginning Spectral Initialization
Calculating the gram matrix...
Finding anchor words...
.........................
Recovering initialization...
........
Initialization complete.
..........................................................................................................
Completed E-Step (1 seconds).
Completed M-Step.
Completing Iteration 1 (approx. per word bound = -4.877)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 2 (approx. per word bound = -4.707, relative change = 3.474e-02)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 3 (approx. per word bound = -4.656, relative change = 1.082e-02)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 4 (approx. per word bound = -4.635, relative change = 4.491e-03)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 5 (approx. per word bound = -4.625, relative change = 2.175e-03)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, also
Topic 3: job, stress, work, life, sourc
Topic 4: feel, like, life, anyth, depress
Topic 5: realli, dont, like, know, think
Topic 6: feel, make, famili, also, financi
Topic 7: realli, feel, parent, want, alway
Topic 8: feel, enough, like, good, depress
Topic 9: thing, feel, depress, can, caus
Topic 10: stress, worri, job, work, sourc
Topic 11: feel, never, like, find, job
Topic 12: feel, constant, like, black, racism
Topic 13: just, right, feel, realli, now
Topic 14: feel, thing, make, constant, last
Topic 15: feel, realli, main, just, job
Topic 16: feel, like, well, enough, good
Topic 17: feel, get, stuck, dont, like
Topic 18: realli, feel, just, sure, late
Topic 19: feel, thing, like, make, last
Topic 20: feel, like, just, hard, tire
Topic 21: stress, realli, feel, sourc, life
Topic 22: stress, worri, life, feel, also
Topic 23: overwhelm, deal, person, cope, lot
Topic 24: alway, cant, feel, worri, just
Topic 25: feel, like, depress, may, thing
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 6 (approx. per word bound = -4.619, relative change = 1.412e-03)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 7 (approx. per word bound = -4.614, relative change = 9.962e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 8 (approx. per word bound = -4.611, relative change = 7.578e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 9 (approx. per word bound = -4.608, relative change = 5.195e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 10 (approx. per word bound = -4.606, relative change = 4.067e-04)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, job
Topic 3: job, work, long, stress, hour
Topic 4: feel, like, life, live, anyth
Topic 5: realli, dont, think, know, man
Topic 6: make, worri, feel, money, financi
Topic 7: realli, want, parent, alway, famili
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, worri, job, work, sourc
Topic 11: never, feel, abl, find, job
Topic 12: constant, like, feel, black, racism
Topic 13: just, right, feel, realli, now
Topic 14: thing, feel, anoth, one, constant
Topic 15: main, feel, realli, late, just
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, feel, just, sure, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: stress, realli, take, health, sourc
Topic 22: worri, stress, futur, will, also
Topic 23: stress, overwhelm, can, deal, lot
Topic 24: alway, cant, keep, break, just
Topic 25: feel, like, depress, may, isol
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 11 (approx. per word bound = -4.605, relative change = 3.151e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 12 (approx. per word bound = -4.604, relative change = 2.402e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 13 (approx. per word bound = -4.603, relative change = 1.873e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 14 (approx. per word bound = -4.602, relative change = 1.591e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 15 (approx. per word bound = -4.602, relative change = 1.378e-04)
Topic 1: feel, like, enough, good, make
Topic 2: struggl, feel, find, depress, job
Topic 3: job, long, work, hour, stress
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, know
Topic 6: make, worri, money, feel, financi
Topic 7: parent, realli, want, alway, hispan
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, work, job, sourc, worri
Topic 11: never, feel, abl, job, find
Topic 12: constant, like, black, racism, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, feel, one, relationship
Topic 15: main, feel, realli, work, late
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: realli, stress, take, health, mental
Topic 22: worri, futur, will, also, stress
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, alway, cant, break, just
Topic 25: feel, like, depress, isol, may
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 16 (approx. per word bound = -4.601, relative change = 1.303e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 17 (approx. per word bound = -4.600, relative change = 1.166e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 18 (approx. per word bound = -4.600, relative change = 1.082e-04)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 19 (approx. per word bound = -4.600, relative change = 9.000e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 20 (approx. per word bound = -4.599, relative change = 7.671e-05)
Topic 1: feel, like, perfect, make, good
Topic 2: struggl, feel, find, depress, job
Topic 3: job, long, hour, work, stress
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, parent, alway, famili, realli
Topic 8: feel, enough, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, work, sourc, job, moment
Topic 11: never, abl, job, feel, find
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, feel, one, relationship
Topic 15: main, stress, realli, feel, work
Topic 16: feel, like, well, enough, good
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, late
Topic 19: feel, thing, make, like, last
Topic 20: feel, like, tire, hard, just
Topic 21: realli, stress, take, health, mental
Topic 22: worri, futur, will, also, sure
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, cant, alway, break, just
Topic 25: feel, isol, like, depress, may
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 21 (approx. per word bound = -4.599, relative change = 6.319e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 22 (approx. per word bound = -4.599, relative change = 5.931e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 23 (approx. per word bound = -4.598, relative change = 4.147e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 24 (approx. per word bound = -4.598, relative change = 4.456e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 25 (approx. per word bound = -4.598, relative change = 4.105e-05)
Topic 1: feel, like, perfect, alway, make
Topic 2: struggl, feel, depress, find, job
Topic 3: job, long, hour, work, life
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, famili, parent, alway, realli
Topic 8: enough, feel, like, good, depress
Topic 9: thing, depress, feel, can, mani
Topic 10: stress, sourc, work, moment, job
Topic 11: never, abl, find, job, feel
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, one, feel, relationship
Topic 15: stress, main, realli, life, feel
Topic 16: feel, like, well, enough, pressur
Topic 17: get, feel, stuck, like, dont
Topic 18: realli, sure, feel, just, what
Topic 19: feel, thing, make, last, like
Topic 20: feel, like, tire, just, hard
Topic 21: realli, take, health, stress, mental
Topic 22: worri, futur, will, also, sure
Topic 23: stress, lot, can, overwhelm, deal
Topic 24: keep, cant, break, alway, seem
Topic 25: feel, isol, depress, may, like
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 26 (approx. per word bound = -4.598, relative change = 4.110e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 27 (approx. per word bound = -4.598, relative change = 3.227e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 28 (approx. per word bound = -4.598, relative change = 2.559e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 29 (approx. per word bound = -4.597, relative change = 2.605e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 30 (approx. per word bound = -4.597, relative change = 1.845e-05)
Topic 1: feel, like, alway, perfect, time
Topic 2: struggl, feel, depress, job, find
Topic 3: job, long, hour, work, life
Topic 4: feel, like, life, just, live
Topic 5: realli, dont, think, man, asian
Topic 6: worri, make, money, financi, end
Topic 7: hispan, famili, parent, alway, realli
Topic 8: enough, feel, like, good, depress
Topic 9: thing, depress, feel, can, problem
Topic 10: stress, sourc, work, moment, job
Topic 11: never, abl, find, job, feel
Topic 12: constant, racism, like, black, feel
Topic 13: just, right, feel, realli, now
Topic 14: thing, anoth, one, relationship, feel
Topic 15: stress, main, realli, life, job
Topic 16: feel, like, well, enough, one
Topic 17: get, feel, like, stuck, dont
Topic 18: realli, sure, feel, what, just
Topic 19: feel, thing, make, last, like
Topic 20: feel, like, tire, just, hard
Topic 21: realli, take, health, mental, toll
Topic 22: worri, futur, will, also, life
Topic 23: stress, lot, can, deal, overwhelm
Topic 24: keep, cant, break, seem, everyth
Topic 25: feel, isol, may, depress, overwhelm
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 31 (approx. per word bound = -4.597, relative change = 1.369e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Completing Iteration 32 (approx. per word bound = -4.597, relative change = 1.491e-05)
..........................................................................................................
Completed E-Step (0 seconds).
Completed M-Step.
Model Converged
labelTopics(model_depression_race_2, n = 30)
Topic 1 Top Words:
Highest Prob: feel, like, alway, perfect, time, make, never, good, mistak, enough, can, depress, cant, everyth, relax, allow, peopl, pressur, ever, human, measur, friend, let, love, respect, compar, alon, anyon, reach, famili
FREX: perfect, mistak, time, allow, alway, relax, human, never, respect, let, good, measur, make, like, ever, everyth, progress, feel, can, cant, enough, full, love, reach, peopl, daughter, less, worthi, mind, compar
Lift: allow, perfect, human, bodi, daughter, mind, respect, mistak, relax, notic, contact, capabl, attent, let, truli, cost, possibl, appear, sister, ever, time, progress, less, alway, exercis, never, full, measur, student, outsid
Score: allow, perfect, mistak, alway, never, relax, human, enough, cant, good, like, can, make, time, feel, everyth, measur, ever, depress, let, respect, pressur, compar, full, worthi, truli, friend, peopl, reach, progress
Topic 2 Top Words:
Highest Prob: struggl, feel, depress, job, find, also, famili, relationship, friend, health, enjoy, mental, like, provid, miss, partner, sever, home, behind, back, fail, doesnt, first, place, support, alon, adjust, move, rent, love
FREX: struggl, find, miss, enjoy, partner, back, friend, home, relationship, rent, homesick, adjust, famili, also, diagnos, fail, class, doesnt, sever, provid, foremost, job, depress, evict, health, mental, behind, move, profession, place
Lift: class, homesick, diagnos, rent, adjust, evict, foremost, symptom, part-tim, romant, profession, medic, back, struggl, partner, third, barrier, fun, find, asia, sever, miss, doesnt, home, enjoy, relationship, student, appear, move, fail
Score: struggl, class, find, job, relationship, depress, health, mental, famili, also, partner, friend, enjoy, homesick, provid, diagnos, miss, home, sever, fail, rent, first, back, adjust, symptom, evict, behind, foremost, move, profession
Topic 3 Top Words:
Highest Prob: job, long, hour, work, life, stress, sourc, also, biggest, worri, moment, lot, famili, paid, well, dont, get, respons, time, good, much, abl, constant, sometim, lose, futur, sure, say, support, fire
FREX: hour, long, paid, biggest, job, moment, sourc, work, respons, lose, also, sole, spend, breadwinn, life, laid, worri, microscop, fire, factori, immigr, much, afford, stress, well, injur, famili, lot, home, status
Lift: injur, visa, construct, worker, paid, sole, weekend, microscop, hour, breadwinn, english, long, respons, lose, spend, speak, factori, cost, afford, laid, sibl, immigr, communic, incom, carri, comfort, decis, goe, sight, healthi
Score: hour, long, biggest, sourc, paid, moment, job, stress, respons, worri, visa, work, also, well, life, lot, famili, immigr, breadwinn, lose, fire, status, sole, much, say, factori, microscop, injur, spend, abl
Topic 4 Top Words:
Highest Prob: feel, like, life, just, live, anyth, depress, motion, realli, potenti, purpos, dont, exist, want, fact, day, accomplish, without, peopl, wast, reach, look, forward, hobbi, real, passion, full, goal, differ, make
FREX: purpos, motion, accomplish, potenti, live, exist, without, anyth, forward, passion, life, real, wast, float, reach, hobbi, fact, meaning, drift, like, full, just, day, goal, feel, ambit, mean, fullest, connect, look
Lift: ambit, purpos, drift, meaning, passion, float, accomplish, forward, motion, without, fullest, real, space, exist, hobbi, potenti, wast, goal, full, reach, mean, live, kind, connect, noth, hes, necessarili, puppet, away, interest
Score: anyth, motion, ambit, purpos, potenti, live, life, just, exist, accomplish, wast, like, real, depress, feel, forward, meaning, float, reach, without, day, passion, full, fact, hobbi, drift, direct, look, anywher, goal
Topic 5 Top Words:
Highest Prob: realli, dont, think, man, asian, depress, feel, woman, know, like, white, way, belong, late, turn, help, alon, place, just, need, societi, hispan, world, cultur, there, anywher, fit, old, better, year
FREX: asian, man, belong, think, woman, turn, white, fit, old, cultur, societi, help, place, dont, sorri, dark, way, hello, born, alon, failur, know, anywher, whos, there, sound, need, realli, either, american
Lift: middl, privileg, whos, sound, american, asian, belong, old, fit, born, sexism, man, cultur, hello, sorri, group, either, dark, failur, bad, insid, think, societi, express, histori, woman, white, turn, place, mexico
Score: asian, man, privileg, think, belong, white, turn, know, dont, woman, realli, old, fit, cultur, societi, anywher, depress, dark, sorri, born, way, year, whos, help, hispan, middl, late, hello, failur, world
Topic 6 Top Words:
Highest Prob: worri, make, money, financi, end, meet, feel, pay, bill, situat, constant, famili, also, one, work, provid, abl, mani, futur, current, support, save, two, bare, insecur, polit, reli, communiti, woman, whether
FREX: end, money, pay, financi, worri, bill, meet, situat, make, reli, insecur, provid, bare, save, threaten, polit, two, mother, date, current, attack, support, pandem, famili, member, mani, constant, communiti, futur, one
Lift: pandem, date, reli, end, threaten, insecur, pay, bill, situat, money, financi, bare, full-tim, mother, burnt, save, latina, abil, cover, scrape, expens, yet, attack, member, ident, provid, recogn, either, two, meet
Score: money, financi, end, worri, pay, bill, meet, pandem, situat, make, provid, reli, bare, mani, insecur, mother, two, save, polit, current, constant, threaten, member, futur, abl, attack, famili, date, children, full-tim
Topic 7 Top Words:
Highest Prob: hispan, famili, alway, parent, realli, want, hard, live, everyon, get, come, hey, ive, share, now, work, two, expect, what, came, year, right, ago, kid, america, tradit, countri, just, grew, disappoint
FREX: parent, hispan, came, come, tradit, ago, grade, grew, kid, two, share, strict, want, countri, year, hey, famili, child, marri, everyon, deport, proud, immigr, america, household, felt, still, disappoint, older, live
Lift: adult, strict, undocu, came, didnt, household, shadow, stabl, tradit, child, brother, beat, older, grade, parent, grew, caught, ago, hispan, proud, marri, larg, educ, fulli, kid, sister, come, colleg, languag, deport
Score: hispan, undocu, parent, came, grew, tradit, hey, ago, share, strict, grade, year, two, alway, famili, deport, immigr, come, everyon, felt, want, countri, what, household, proud, america, status, child, ive, live
Topic 8 Top Words:
Highest Prob: enough, feel, like, good, depress, anyth, never, ill, success, smart, pretti, worth, happi, compar, measur, worthi, other, will, burden, everyon, women, deserv, love, talent, one, just, help, cut, thought, see
FREX: enough, smart, success, good, pretti, worthi, worth, anyth, talent, burden, measur, ill, women, deserv, skinni, like, compar, happi, feel, depress, other, handsom, never, thought, thin, beauti, screw, shouldnt, cut, nobodi
Lift: thin, smart, talent, skinni, handsom, burden, worthi, success, nobodi, worth, pretti, good, deserv, enough, women, thought, beauti, worthless, measur, screw, inferior, compet, ill, compar, other, awhil, shouldnt, attract, cut, anyth
Score: enough, good, smart, anyth, thin, success, like, worth, ill, depress, worthi, feel, measur, compar, burden, never, talent, skinni, pretti, women, deserv, screw, other, shouldnt, worthless, happi, will, thought, beauti, handsom
Topic 9 Top Words:
Highest Prob: thing, depress, feel, can, problem, mani, caus, combin, person, might, contribut, troubl, number, also, relationship, discourag, way, hopeless, often, mayb, life, reason, think, talk, factor, addit, therapist, due, may, help
FREX: problem, number, combin, mayb, contribut, factor, common, mani, includ, troubl, discourag, therapist, due, might, addit, thing, hopeless, can, isnt, pinpoint, reason, inadequaci, caus, whatev, trigger, often, person, difficulti, chronic, women
Lift: chronic, address, brain, common, doctor, lay, exact, extrem, number, includ, activ, factor, dishearten, mayb, problem, inadequaci, due, therapist, most, contribut, combin, isnt, pinpoint, trigger, mood, addit, usual, mani, condit, whatev
Score: problem, combin, address, thing, mani, contribut, common, depress, can, caus, mayb, number, therapist, troubl, might, includ, due, may, person, factor, whatev, chronic, addit, reason, pinpoint, relationship, often, lead, discourag, difficulti
Topic 10 Top Words:
Highest Prob: stress, sourc, work, moment, job, like, life, biggest, worri, feel, constant, pressur, also, environ, meet, often, enough, perform, whether, high-pressur, lot, alway, futur, abl, well, deadlin, expect, mistak, sometim, make
FREX: environ, moment, biggest, high-pressur, perform, sourc, often, pressur, whether, deadlin, meet, work, fast-pac, stress, worri, job, bosss, demand, mistak, retir, constant, team, fire, life, expect, demot, corpor, also, say, probabl
Lift: graduat, environ, fast-pac, high-pressur, scrutini, debilit, deadlin, perform, demot, team, often, bosss, retir, whether, second-guess, level, econom, high-stress, track, moment, credit, corpor, secur, pressur, verg, employ, biggest, abil, demand, meet
Score: biggest, moment, environ, sourc, high-pressur, perform, stress, deadlin, often, whether, mistak, job, worri, pressur, meet, graduat, work, constant, well, enough, fast-pac, team, demand, expect, life, futur, bosss, abl, also, alway
Topic 11 Top Words:
Highest Prob: never, abl, find, job, ill, feel, ive, like, amount, start, look, depress, struggl, cycl, will, time, way, one, month, havent, unemploy, luck, neighborhood, improv, send, want, resum, odd, support, respect
FREX: never, amount, abl, luck, ill, find, look, havent, resum, unemploy, ive, month, cycl, odd, send, improv, start, neighborhood, job, gotten, interview, overcom, relief, forev, will, respect, suffer, wish, scrape, voic
Lift: gotten, interview, luck, resum, overcom, forev, odd, amount, havent, unemploy, send, improv, relief, month, suffer, opinion, neighborhood, endless, loan, scrape, elder, optimist, cycl, never, insid, voic, look, poor, abl, wonder
Score: never, gotten, find, abl, amount, luck, ill, ive, job, resum, start, havent, unemploy, cycl, look, month, will, send, neighborhood, interview, odd, improv, forev, overcom, struggl, suffer, told, scrape, respect, poor
Topic 12 Top Words:
Highest Prob: constant, racism, like, feel, black, discrimin, judg, alway, stress, woman, life, skin, exhaust, color, hard, prove, sourc, biggest, daili, basi, moment, treat, twice, seen, one, race, white, peopl, guard, equal
FREX: racism, color, skin, judg, discrimin, awar, basi, daili, prove, exhaust, counterpart, guard, race, equal, seen, black, safeti, unfair, twice, treat, watch, woman, target, face, depart, constant, opportun, experi, worth, stereotyp
Lift: avoid, imag, awar, base, confront, counterpart, crap, danger, fair, present, second-class, color, perceiv, convers, skin, exclud, found, oppress, stereotyp, unfair, judg, racism, target, basi, eggshel, daili, equal, guard, race, made
Score: racism, discrimin, color, avoid, black, skin, judg, twice, prove, basi, daili, biggest, seen, equal, awar, guard, moment, sourc, exhaust, race, counterpart, constant, unfair, safeti, target, watch, treat, woman, face, experi
Topic 13 Top Words:
Highest Prob: just, right, feel, realli, now, know, cant, struggl, dont, seem, anyth, like, everyth, time, tire, alon, depress, shake, lost, helpless, happi, hopeless, better, help, pointless, everyon, turn, true, need, fail
FREX: right, now, just, know, cant, shake, lost, helpless, seem, pointless, true, anyth, alon, hopeless, joy, realli, everyth, shouldnt, struggl, happi, better, motiv, help, wrong, dont, grate, funk, energi, tire, fail
Lift: ’ve, bring, pointless, joy, true, right, helpless, now, shake, lost, disappear, effort, dear, know, cant, hopeless, bleak, shouldnt, just, energi, seem, read, motiv, curl, blue, outgo, grate, better, seek, funk
Score: right, now, just, know, cant, realli, anyth, seem, struggl, shake, ’ve, dont, pointless, everyth, lost, helpless, tire, true, hopeless, turn, alon, joy, shouldnt, better, feel, help, motiv, fail, happi, funk
Topic 14 Top Words:
Highest Prob: thing, anoth, one, relationship, feel, last, lot, caus, like, constant, hard, make, alway, big, tri, fight, stress, save, pressur, someth, take, work-rel, sometim, health, togeth, stay, struggl, abl, deal, argu
FREX: anoth, big, relationship, last, strain, save, work-rel, complet, tension, argu, weve, one, togeth, thing, stay, debt, increas, disagr, hous, fight, patch, rough, partner, member, critic, caus, lack, stabil, readi, girlfriend
Lift: disagr, stabil, patch, rough, strain, critic, payment, big, tension, complet, increas, weve, lack, anoth, girlfriend, debt, hous, expens, death, cover, left, work-rel, argu, readi, decis, express, leav, hes, heart, griev
Score: stabil, anoth, last, relationship, thing, big, caus, work-rel, strain, complet, fight, argu, tension, disagr, one, weve, save, member, partner, patch, rough, critic, experi, hous, lack, expens, debt, stay, girlfriend, increas
Topic 15 Top Words:
Highest Prob: stress, main, realli, life, job, sourc, feel, work, late, just, constant, hard, day, start, offic, time, need, like, tire, peopl, surround, cut, posit, custom, today, overwhelm, focus, feet, keep, everi
FREX: main, offic, focus, cut, surround, servic, sourc, feet, stress, custom, posit, day, machin, mom, late, need, call, center, phone, today, life, work, job, start, nois, anymor, realli, cog, sleep, screw
Lift: nois, build, call, center, crazi, phone, stay--hom, focus, mom, servic, dread, machin, main, cog, offic, desk, feet, bore, posit, surround, burn, sleep, unmotiv, custom, challeng, concentr, drain, primari, store, consid
Score: main, sourc, stress, build, job, offic, realli, late, custom, work, start, life, day, servic, feet, surround, focus, phone, just, call, center, machin, constant, cut, tire, mom, dread, nois, posit, need
Topic 16 Top Words:
Highest Prob: feel, like, well, one, enough, pressur, succeed, expect, fall, make, thing, also, depress, school, good, famili, meet, work, lot, short, friend, behind, constant, compar, best, anoth, fact, even, miss, colleagu
FREX: succeed, well, fall, school, expect, short, pressur, compar, colleagu, behind, standard, one, best, though, boss, miss, friend, enough, meet, recognit, even, other, fact, criticis, like, product, feel, peer, academ, understand
Lift: criticis, product, peer, touch, girl, short, recognit, school, succeed, fall, standard, though, colleagu, academ, promot, best, well, attract, attent, notic, aspect, busi, behind, proper, father, expect, disappoint, boss, compar, high
Score: well, school, succeed, criticis, fall, expect, pressur, short, compar, enough, meet, colleagu, thing, though, behind, one, feel, boss, standard, friend, like, good, anoth, depress, best, disappoint, famili, also, make, troubl
Topic 17 Top Words:
Highest Prob: get, feel, like, stuck, dont, rut, work, know, job, ahead, hate, life, see, way, anywher, hard, depress, realli, seem, spin, today, wheel, dead-end, place, nowher, move, unhappi, chang, just, hold
FREX: stuck, rut, get, ahead, hate, dont, know, anywher, dead-end, see, spin, wheel, nowher, today, unhappi, advanc, prospect, low-pay, work, like, way, move, feel, chang, job, place, citi, predomin, away, seem
Lift: advanc, prospect, citi, low-pay, rut, dead-end, stuck, hate, ahead, nowher, get, unhappi, wheel, spin, capabl, anywher, heard, move, today, chang, result, predomin, away, dont, place, sick, see, area, hold, voic
Score: stuck, rut, get, citi, ahead, dont, know, hate, anywher, job, spin, dead-end, wheel, nowher, work, see, low-pay, like, unhappi, today, advanc, prospect, seem, way, move, feel, chang, hold, away, predomin
Topic 18 Top Words:
Highest Prob: realli, sure, what, late, feel, just, caus, think, want, hey, everyon, ive, might, anyon, someth, talk, white, share, depress, appreci, dont, advic, great, turn, earli, lot, seem, that, word, know
FREX: what, sure, advic, hey, word, late, appreci, great, thank, might, bed, encourag, earli, want, anyon, think, share, everyon, talk, guy, caus, realli, nice, listen, ive, morn, someth, white, snap, shake
Lift: word, advic, encourag, sort, wisdom, thank, stuff, nice, realiz, bed, twenti, morn, guy, great, listen, what, earli, appreci, snap, littl, hey, empti, chest, wors, sure, eat, share, mexico, might, honest
Score: what, hey, realli, sure, late, advic, sort, caus, word, might, share, just, ive, great, anyon, think, everyon, encourag, white, bed, thank, appreci, turn, earli, talk, want, wisdom, guy, nice, morn
Topic 19 Top Words:
Highest Prob: feel, make, thing, last, like, realli, first, dont, depress, second, lone, general, one, friend, anyon, sure, person, also, close, final, talk, current, use, peopl, that, lot, want, issu, just, career
FREX: second, first, last, general, final, close, use, lone, thing, make, climat, anyon, confid, career, talk, friend, singl, along, polit, weigh, self-imag, that, current, dont, progress, person, apart, disconnect, countri, despit
Lift: divid, unrest, disconnect, divis, insurmount, confid, despit, wont, self-imag, second, nearbi, final, first, close, climat, work-lif, scare, age, term, along, lone, general, last, offer, use, studi, progress, apart, singl, break-
Score: first, last, second, thing, lone, make, insurmount, close, general, final, climat, use, issu, anyon, dont, depress, person, realli, friend, polit, current, talk, singl, difficulti, countri, weigh, confid, disconnect, career, sure
Topic 20 Top Words:
Highest Prob: feel, like, tire, just, hard, black, matter, els, fight, depress, see, everyon, sometim, man, alway, get, constant, battl, peopl, uphil, strong, way, world, work, woman, tri, everi, twice, live, expect
FREX: matter, tire, els, battl, uphil, fight, black, half, strong, see, sometim, pretend, hard, poverti, escap, far, everyon, twice, okay, macho, man, everi, men, weak, stack, stoic, face, news, show, told
Lift: brave, deck, half, incred, stack, stoic, surviv, bear, inequ, macho, battl, poverti, uphil, pretend, act, matter, flail, strong, okay, els, weak, show, independ, told, far, fight, escap, weight, news, tire
Score: black, tire, matter, fight, incred, els, battl, uphil, half, strong, twice, man, see, just, everyon, told, pretend, weak, far, show, poverti, world, face, discrimin, disadvantag, hard, everi, okay, stack, macho
Topic 21 Top Words:
Highest Prob: realli, take, health, mental, toll, constant, stress, right, now, feel, life, start, much, tough, physic, sourc, can, demand, longer, keep, pressur, enjoy, restaur, alway, relax, hard, affect, cope, work, custom
FREX: take, toll, mental, health, longer, physic, restaur, demand, tough, much, start, yell, rude, realli, right, constant, now, affect, fast, free, impact, qualiti, enjoy, custom, rope, chanc, relax, stress, oblig, emot
Lift: chanc, rude, qualiti, oblig, yell, smile, rope, toll, longer, take, physic, restaur, industri, impact, mental, fast, health, free, pace, chaotic, tough, affect, food, busi, demand, breakdown, start, custom, ask, burn
Score: toll, take, mental, health, physic, chanc, realli, demand, stress, restaur, start, longer, sourc, now, right, constant, impact, custom, much, relax, tough, yell, rude, keep, cope, enjoy, affect, fast, free, can
Topic 22 Top Words:
Highest Prob: worri, futur, will, also, life, happen, sure, world, stress, state, live, sourc, feel, hold, biggest, whether, constant, moment, like, one, polic, current, day, someth, that, there, violenc, children, everi, abl
FREX: happen, hold, will, state, futur, polic, world, uncertainti, violenc, crime, worri, crossroad, pull, safe, whether, children, next, threat, direct, victim, there, paycheck, care, that, stop, current, everi, differ, sure, path
Lift: crossroad, economi, powerless, racist, uncertainti, crime, victim, pull, paycheck, grow, concern, happen, polic, safe, hold, mistreat, brutal, next, threat, violenc, scari, street, children, stop, stori, state, path, will, turmoil, direct
Score: economi, worri, will, polic, futur, happen, world, biggest, state, uncertainti, hold, crime, violenc, threat, moment, sourc, victim, children, crossroad, whether, safe, pull, direct, next, kill, stress, brutal, sure, paycheck, current
Topic 23 Top Words:
Highest Prob: lot, stress, can, deal, person, overwhelm, time, life, work, issu, anxieti, cope, difficult, one, caus, balanc, divorc, manag, differ, lead, someth, high, frustrat, probabl, put, quit, stressor, juggl, weigh, outsid
FREX: deal, lot, balanc, person, anxieti, difficult, issu, divorc, manag, cope, can, lead, overwhelm, worklif, major, stress, field, quit, process, high, overal, juggl, task, time, probabl, stressor, handl, outsid, differ, competit
Lift: task, major, field, process, worklif, overal, difficult, manag, balanc, divorc, anxieti, deal, competit, juggl, overwhelm, lead, cope, especi, issu, stressor, outsid, eas, handl, proper, million, high, latina, employ, primari, person
Score: major, stress, deal, overwhelm, can, issu, lot, difficult, person, cope, anxieti, balanc, lead, divorc, manag, field, caus, stressor, worklif, process, high, quit, juggl, probabl, competit, weigh, differ, work, outsid, time
Topic 24 Top Words:
Highest Prob: keep, cant, seem, break, everyth, like, tri, just, catch, alway, hard, head, water, feel, ever, your, behind, late, time, someth, tough, peopl, give, life, relax, work, best, someon, tread, around
FREX: break, keep, catch, seem, water, head, everyth, tri, your, cant, ever, tread, give, drown, pleas, behind, harder, schoolwork, done, best, energi, sibl, hard, week, someon, alway, verg, tough, drama, tabl
Lift: drama, drown, tabl, schoolwork, slowli, break, pleas, catch, water, head, your, keep, tread, harder, week, hospit, breakdown, done, outgo, tri, sibl, certain, store, student, give, sick, ever, colleg, harass, pile
Score: break, keep, catch, tabl, seem, cant, water, everyth, head, tri, your, just, alway, ever, drown, tread, harder, pleas, behind, drama, sibl, relax, done, hard, schoolwork, give, week, colleg, slowli, juggl
Topic 25 Top Words:
Highest Prob: feel, isol, overwhelm, may, depress, lone, anxious, like, thing, futur, mani, make, respons, sad, caus, past, pain, anyon, part, fatigu, recent, ill, whatev, understood, experienc, hopeless, physic, helpless, other, dont
FREX: isol, may, anxious, overwhelm, lone, past, sad, fatigu, pain, respons, understood, recent, part, whatev, feel, mani, experienc, futur, depress, anyon, helpless, goal, hopeless, thing, physic, other, loss, caus, make, financ
Lift: fatigu, isol, understood, past, may, anxious, pain, sad, condit, symptom, recent, whatev, overwhelm, experienc, lone, loss, financ, part, specif, goal, respons, worthless, physic, mani, disappoint, helpless, reason, contribut, hopeless, difficult
Score: fatigu, isol, may, overwhelm, lone, anxious, respons, sad, past, pain, whatev, feel, depress, mani, condit, physic, understood, thing, futur, experienc, recent, symptom, part, loss, caus, specif, financ, anyon, difficult, cope
labelTopics(model_depression, n = 30)
Topic 1 Top Words:
Highest Prob: feel, like, alway, perfect, time, make, never, good, mistak, enough, can, depress, cant, everyth, relax, allow, peopl, pressur, ever, human, measur, friend, let, love, respect, compar, alon, anyon, reach, famili
FREX: perfect, mistak, time, allow, alway, relax, human, never, respect, let, good, measur, make, like, ever, everyth, progress, feel, can, cant, enough, full, love, reach, peopl, daughter, less, worthi, mind, compar
Lift: allow, perfect, human, bodi, daughter, mind, respect, mistak, relax, notic, contact, capabl, attent, let, truli, cost, possibl, appear, sister, ever, time, progress, less, alway, exercis, never, full, measur, student, outsid
Score: allow, perfect, mistak, alway, never, relax, human, enough, cant, good, like, can, make, time, feel, everyth, measur, ever, depress, let, respect, pressur, compar, full, worthi, truli, friend, peopl, reach, progress
Topic 2 Top Words:
Highest Prob: struggl, feel, depress, job, find, also, famili, relationship, friend, health, enjoy, mental, like, provid, miss, partner, sever, home, behind, back, fail, doesnt, first, place, support, alon, adjust, move, rent, love
FREX: struggl, find, miss, enjoy, partner, back, friend, home, relationship, rent, homesick, adjust, famili, also, diagnos, fail, class, doesnt, sever, provid, foremost, job, depress, evict, health, mental, behind, move, profession, place
Lift: class, homesick, diagnos, rent, adjust, evict, foremost, symptom, part-tim, romant, profession, medic, back, struggl, partner, third, barrier, fun, find, asia, sever, miss, doesnt, home, enjoy, relationship, student, appear, move, fail
Score: struggl, class, find, job, relationship, depress, health, mental, famili, also, partner, friend, enjoy, homesick, provid, diagnos, miss, home, sever, fail, rent, first, back, adjust, symptom, evict, behind, foremost, move, profession
Topic 3 Top Words:
Highest Prob: job, long, hour, work, life, stress, sourc, also, biggest, worri, moment, lot, famili, paid, well, dont, get, respons, time, good, much, abl, constant, sometim, lose, futur, sure, say, support, fire
FREX: hour, long, paid, biggest, job, moment, sourc, work, respons, lose, also, sole, spend, breadwinn, life, laid, worri, microscop, fire, factori, immigr, much, afford, stress, well, injur, famili, lot, home, status
Lift: injur, visa, construct, worker, paid, sole, weekend, microscop, hour, breadwinn, english, long, respons, lose, spend, speak, factori, cost, afford, laid, sibl, immigr, communic, incom, carri, comfort, decis, goe, sight, healthi
Score: hour, long, biggest, sourc, paid, moment, job, stress, respons, worri, visa, work, also, well, life, lot, famili, immigr, breadwinn, lose, fire, status, sole, much, say, factori, microscop, injur, spend, abl
Topic 4 Top Words:
Highest Prob: feel, like, life, just, live, anyth, depress, motion, realli, potenti, purpos, dont, exist, want, fact, day, accomplish, without, peopl, wast, reach, look, forward, hobbi, real, passion, full, goal, differ, make
FREX: purpos, motion, accomplish, potenti, live, exist, without, anyth, forward, passion, life, real, wast, float, reach, hobbi, fact, meaning, drift, like, full, just, day, goal, feel, ambit, mean, fullest, connect, look
Lift: ambit, purpos, drift, meaning, passion, float, accomplish, forward, motion, without, fullest, real, space, exist, hobbi, potenti, wast, goal, full, reach, mean, live, kind, connect, noth, hes, necessarili, puppet, away, interest
Score: anyth, motion, ambit, purpos, potenti, live, life, just, exist, accomplish, wast, like, real, depress, feel, forward, meaning, float, reach, without, day, passion, full, fact, hobbi, drift, direct, look, anywher, goal
Topic 5 Top Words:
Highest Prob: realli, dont, think, man, asian, depress, feel, woman, know, like, white, way, belong, late, turn, help, alon, place, just, need, societi, hispan, world, cultur, there, anywher, fit, old, better, year
FREX: asian, man, belong, think, woman, turn, white, fit, old, cultur, societi, help, place, dont, sorri, dark, way, hello, born, alon, failur, know, anywher, whos, there, sound, need, realli, either, american
Lift: middl, privileg, whos, sound, american, asian, belong, old, fit, born, sexism, man, cultur, hello, sorri, group, either, dark, failur, bad, insid, think, societi, express, histori, woman, white, turn, place, mexico
Score: asian, man, privileg, think, belong, white, turn, know, dont, woman, realli, old, fit, cultur, societi, anywher, depress, dark, sorri, born, way, year, whos, help, hispan, middl, late, hello, failur, world
Topic 6 Top Words:
Highest Prob: worri, make, money, financi, end, meet, feel, pay, bill, situat, constant, famili, also, one, work, provid, abl, mani, futur, current, support, save, two, bare, insecur, polit, reli, communiti, woman, whether
FREX: end, money, pay, financi, worri, bill, meet, situat, make, reli, insecur, provid, bare, save, threaten, polit, two, mother, date, current, attack, support, pandem, famili, member, mani, constant, communiti, futur, one
Lift: pandem, date, reli, end, threaten, insecur, pay, bill, situat, money, financi, bare, full-tim, mother, burnt, save, latina, abil, cover, scrape, expens, yet, attack, member, ident, provid, recogn, either, two, meet
Score: money, financi, end, worri, pay, bill, meet, pandem, situat, make, provid, reli, bare, mani, insecur, mother, two, save, polit, current, constant, threaten, member, futur, abl, attack, famili, date, children, full-tim
Topic 7 Top Words:
Highest Prob: hispan, famili, alway, parent, realli, want, hard, live, everyon, get, come, hey, ive, share, now, work, two, expect, what, came, year, right, ago, kid, america, tradit, countri, just, grew, disappoint
FREX: parent, hispan, came, come, tradit, ago, grade, grew, kid, two, share, strict, want, countri, year, hey, famili, child, marri, everyon, deport, proud, immigr, america, household, felt, still, disappoint, older, live
Lift: adult, strict, undocu, came, didnt, household, shadow, stabl, tradit, child, brother, beat, older, grade, parent, grew, caught, ago, hispan, proud, marri, larg, educ, fulli, kid, sister, come, colleg, languag, deport
Score: hispan, undocu, parent, came, grew, tradit, hey, ago, share, strict, grade, year, two, alway, famili, deport, immigr, come, everyon, felt, want, countri, what, household, proud, america, status, child, ive, live
Topic 8 Top Words:
Highest Prob: enough, feel, like, good, depress, anyth, never, ill, success, smart, pretti, worth, happi, compar, measur, worthi, other, will, burden, everyon, women, deserv, love, talent, one, just, help, cut, thought, see
FREX: enough, smart, success, good, pretti, worthi, worth, anyth, talent, burden, measur, ill, women, deserv, skinni, like, compar, happi, feel, depress, other, handsom, never, thought, thin, beauti, screw, shouldnt, cut, nobodi
Lift: thin, smart, talent, skinni, handsom, burden, worthi, success, nobodi, worth, pretti, good, deserv, enough, women, thought, beauti, worthless, measur, screw, inferior, compet, ill, compar, other, awhil, shouldnt, attract, cut, anyth
Score: enough, good, smart, anyth, thin, success, like, worth, ill, depress, worthi, feel, measur, compar, burden, never, talent, skinni, pretti, women, deserv, screw, other, shouldnt, worthless, happi, will, thought, beauti, handsom
Topic 9 Top Words:
Highest Prob: thing, depress, feel, can, problem, mani, caus, combin, person, might, contribut, troubl, number, also, relationship, discourag, way, hopeless, often, mayb, life, reason, think, talk, factor, addit, therapist, due, may, help
FREX: problem, number, combin, mayb, contribut, factor, common, mani, includ, troubl, discourag, therapist, due, might, addit, thing, hopeless, can, isnt, pinpoint, reason, inadequaci, caus, whatev, trigger, often, person, difficulti, chronic, women
Lift: chronic, address, brain, common, doctor, lay, exact, extrem, number, includ, activ, factor, dishearten, mayb, problem, inadequaci, due, therapist, most, contribut, combin, isnt, pinpoint, trigger, mood, addit, usual, mani, condit, whatev
Score: problem, combin, address, thing, mani, contribut, common, depress, can, caus, mayb, number, therapist, troubl, might, includ, due, may, person, factor, whatev, chronic, addit, reason, pinpoint, relationship, often, lead, discourag, difficulti
Topic 10 Top Words:
Highest Prob: stress, sourc, work, moment, job, like, life, biggest, worri, feel, constant, pressur, also, environ, meet, often, enough, perform, whether, high-pressur, lot, alway, futur, abl, well, deadlin, expect, mistak, sometim, make
FREX: environ, moment, biggest, high-pressur, perform, sourc, often, pressur, whether, deadlin, meet, work, fast-pac, stress, worri, job, bosss, demand, mistak, retir, constant, team, fire, life, expect, demot, corpor, also, say, probabl
Lift: graduat, environ, fast-pac, high-pressur, scrutini, debilit, deadlin, perform, demot, team, often, bosss, retir, whether, second-guess, level, econom, high-stress, track, moment, credit, corpor, secur, pressur, verg, employ, biggest, abil, demand, meet
Score: biggest, moment, environ, sourc, high-pressur, perform, stress, deadlin, often, whether, mistak, job, worri, pressur, meet, graduat, work, constant, well, enough, fast-pac, team, demand, expect, life, futur, bosss, abl, also, alway
Topic 11 Top Words:
Highest Prob: never, abl, find, job, ill, feel, ive, like, amount, start, look, depress, struggl, cycl, will, time, way, one, month, havent, unemploy, luck, neighborhood, improv, send, want, resum, odd, support, respect
FREX: never, amount, abl, luck, ill, find, look, havent, resum, unemploy, ive, month, cycl, odd, send, improv, start, neighborhood, job, gotten, interview, overcom, relief, forev, will, respect, suffer, wish, scrape, voic
Lift: gotten, interview, luck, resum, overcom, forev, odd, amount, havent, unemploy, send, improv, relief, month, suffer, opinion, neighborhood, endless, loan, scrape, elder, optimist, cycl, never, insid, voic, look, poor, abl, wonder
Score: never, gotten, find, abl, amount, luck, ill, ive, job, resum, start, havent, unemploy, cycl, look, month, will, send, neighborhood, interview, odd, improv, forev, overcom, struggl, suffer, told, scrape, respect, poor
Topic 12 Top Words:
Highest Prob: constant, racism, like, feel, black, discrimin, judg, alway, stress, woman, life, skin, exhaust, color, hard, prove, sourc, biggest, daili, basi, moment, treat, twice, seen, one, race, white, peopl, guard, equal
FREX: racism, color, skin, judg, discrimin, awar, basi, daili, prove, exhaust, counterpart, guard, race, equal, seen, black, safeti, unfair, twice, treat, watch, woman, target, face, depart, constant, opportun, experi, worth, stereotyp
Lift: avoid, imag, awar, base, confront, counterpart, crap, danger, fair, present, second-class, color, perceiv, convers, skin, exclud, found, oppress, stereotyp, unfair, judg, racism, target, basi, eggshel, daili, equal, guard, race, made
Score: racism, discrimin, color, avoid, black, skin, judg, twice, prove, basi, daili, biggest, seen, equal, awar, guard, moment, sourc, exhaust, race, counterpart, constant, unfair, safeti, target, watch, treat, woman, face, experi
Topic 13 Top Words:
Highest Prob: just, right, feel, realli, now, know, cant, struggl, dont, seem, anyth, like, everyth, time, tire, alon, depress, shake, lost, helpless, happi, hopeless, better, help, pointless, everyon, turn, true, need, fail
FREX: right, now, just, know, cant, shake, lost, helpless, seem, pointless, true, anyth, alon, hopeless, joy, realli, everyth, shouldnt, struggl, happi, better, motiv, help, wrong, dont, grate, funk, energi, tire, fail
Lift: ’ve, bring, pointless, joy, true, right, helpless, now, shake, lost, disappear, effort, dear, know, cant, hopeless, bleak, shouldnt, just, energi, seem, read, motiv, curl, blue, outgo, grate, better, seek, funk
Score: right, now, just, know, cant, realli, anyth, seem, struggl, shake, ’ve, dont, pointless, everyth, lost, helpless, tire, true, hopeless, turn, alon, joy, shouldnt, better, feel, help, motiv, fail, happi, funk
Topic 14 Top Words:
Highest Prob: thing, anoth, one, relationship, feel, last, lot, caus, like, constant, hard, make, alway, big, tri, fight, stress, save, pressur, someth, take, work-rel, sometim, health, togeth, stay, struggl, abl, deal, argu
FREX: anoth, big, relationship, last, strain, save, work-rel, complet, tension, argu, weve, one, togeth, thing, stay, debt, increas, disagr, hous, fight, patch, rough, partner, member, critic, caus, lack, stabil, readi, girlfriend
Lift: disagr, stabil, patch, rough, strain, critic, payment, big, tension, complet, increas, weve, lack, anoth, girlfriend, debt, hous, expens, death, cover, left, work-rel, argu, readi, decis, express, leav, hes, heart, griev
Score: stabil, anoth, last, relationship, thing, big, caus, work-rel, strain, complet, fight, argu, tension, disagr, one, weve, save, member, partner, patch, rough, critic, experi, hous, lack, expens, debt, stay, girlfriend, increas
Topic 15 Top Words:
Highest Prob: stress, main, realli, life, job, sourc, feel, work, late, just, constant, hard, day, start, offic, time, need, like, tire, peopl, surround, cut, posit, custom, today, overwhelm, focus, feet, keep, everi
FREX: main, offic, focus, cut, surround, servic, sourc, feet, stress, custom, posit, day, machin, mom, late, need, call, center, phone, today, life, work, job, start, nois, anymor, realli, cog, sleep, screw
Lift: nois, build, call, center, crazi, phone, stay--hom, focus, mom, servic, dread, machin, main, cog, offic, desk, feet, bore, posit, surround, burn, sleep, unmotiv, custom, challeng, concentr, drain, primari, store, consid
Score: main, sourc, stress, build, job, offic, realli, late, custom, work, start, life, day, servic, feet, surround, focus, phone, just, call, center, machin, constant, cut, tire, mom, dread, nois, posit, need
Topic 16 Top Words:
Highest Prob: feel, like, well, one, enough, pressur, succeed, expect, fall, make, thing, also, depress, school, good, famili, meet, work, lot, short, friend, behind, constant, compar, best, anoth, fact, even, miss, colleagu
FREX: succeed, well, fall, school, expect, short, pressur, compar, colleagu, behind, standard, one, best, though, boss, miss, friend, enough, meet, recognit, even, other, fact, criticis, like, product, feel, peer, academ, understand
Lift: criticis, product, peer, touch, girl, short, recognit, school, succeed, fall, standard, though, colleagu, academ, promot, best, well, attract, attent, notic, aspect, busi, behind, proper, father, expect, disappoint, boss, compar, high
Score: well, school, succeed, criticis, fall, expect, pressur, short, compar, enough, meet, colleagu, thing, though, behind, one, feel, boss, standard, friend, like, good, anoth, depress, best, disappoint, famili, also, make, troubl
Topic 17 Top Words:
Highest Prob: get, feel, like, stuck, dont, rut, work, know, job, ahead, hate, life, see, way, anywher, hard, depress, realli, seem, spin, today, wheel, dead-end, place, nowher, move, unhappi, chang, just, hold
FREX: stuck, rut, get, ahead, hate, dont, know, anywher, dead-end, see, spin, wheel, nowher, today, unhappi, advanc, prospect, low-pay, work, like, way, move, feel, chang, job, place, citi, predomin, away, seem
Lift: advanc, prospect, citi, low-pay, rut, dead-end, stuck, hate, ahead, nowher, get, unhappi, wheel, spin, capabl, anywher, heard, move, today, chang, result, predomin, away, dont, place, sick, see, area, hold, voic
Score: stuck, rut, get, citi, ahead, dont, know, hate, anywher, job, spin, dead-end, wheel, nowher, work, see, low-pay, like, unhappi, today, advanc, prospect, seem, way, move, feel, chang, hold, away, predomin
Topic 18 Top Words:
Highest Prob: realli, sure, what, late, feel, just, caus, think, want, hey, everyon, ive, might, anyon, someth, talk, white, share, depress, appreci, dont, advic, great, turn, earli, lot, seem, that, word, know
FREX: what, sure, advic, hey, word, late, appreci, great, thank, might, bed, encourag, earli, want, anyon, think, share, everyon, talk, guy, caus, realli, nice, listen, ive, morn, someth, white, snap, shake
Lift: word, advic, encourag, sort, wisdom, thank, stuff, nice, realiz, bed, twenti, morn, guy, great, listen, what, earli, appreci, snap, littl, hey, empti, chest, wors, sure, eat, share, mexico, might, honest
Score: what, hey, realli, sure, late, advic, sort, caus, word, might, share, just, ive, great, anyon, think, everyon, encourag, white, bed, thank, appreci, turn, earli, talk, want, wisdom, guy, nice, morn
Topic 19 Top Words:
Highest Prob: feel, make, thing, last, like, realli, first, dont, depress, second, lone, general, one, friend, anyon, sure, person, also, close, final, talk, current, use, peopl, that, lot, want, issu, just, career
FREX: second, first, last, general, final, close, use, lone, thing, make, climat, anyon, confid, career, talk, friend, singl, along, polit, weigh, self-imag, that, current, dont, progress, person, apart, disconnect, countri, despit
Lift: divid, unrest, disconnect, divis, insurmount, confid, despit, wont, self-imag, second, nearbi, final, first, close, climat, work-lif, scare, age, term, along, lone, general, last, offer, use, studi, progress, apart, singl, break-
Score: first, last, second, thing, lone, make, insurmount, close, general, final, climat, use, issu, anyon, dont, depress, person, realli, friend, polit, current, talk, singl, difficulti, countri, weigh, confid, disconnect, career, sure
Topic 20 Top Words:
Highest Prob: feel, like, tire, just, hard, black, matter, els, fight, depress, see, everyon, sometim, man, alway, get, constant, battl, peopl, uphil, strong, way, world, work, woman, tri, everi, twice, live, expect
FREX: matter, tire, els, battl, uphil, fight, black, half, strong, see, sometim, pretend, hard, poverti, escap, far, everyon, twice, okay, macho, man, everi, men, weak, stack, stoic, face, news, show, told
Lift: brave, deck, half, incred, stack, stoic, surviv, bear, inequ, macho, battl, poverti, uphil, pretend, act, matter, flail, strong, okay, els, weak, show, independ, told, far, fight, escap, weight, news, tire
Score: black, tire, matter, fight, incred, els, battl, uphil, half, strong, twice, man, see, just, everyon, told, pretend, weak, far, show, poverti, world, face, discrimin, disadvantag, hard, everi, okay, stack, macho
Topic 21 Top Words:
Highest Prob: realli, take, health, mental, toll, constant, stress, right, now, feel, life, start, much, tough, physic, sourc, can, demand, longer, keep, pressur, enjoy, restaur, alway, relax, hard, affect, cope, work, custom
FREX: take, toll, mental, health, longer, physic, restaur, demand, tough, much, start, yell, rude, realli, right, constant, now, affect, fast, free, impact, qualiti, enjoy, custom, rope, chanc, relax, stress, oblig, emot
Lift: chanc, rude, qualiti, oblig, yell, smile, rope, toll, longer, take, physic, restaur, industri, impact, mental, fast, health, free, pace, chaotic, tough, affect, food, busi, demand, breakdown, start, custom, ask, burn
Score: toll, take, mental, health, physic, chanc, realli, demand, stress, restaur, start, longer, sourc, now, right, constant, impact, custom, much, relax, tough, yell, rude, keep, cope, enjoy, affect, fast, free, can
Topic 22 Top Words:
Highest Prob: worri, futur, will, also, life, happen, sure, world, stress, state, live, sourc, feel, hold, biggest, whether, constant, moment, like, one, polic, current, day, someth, that, there, violenc, children, everi, abl
FREX: happen, hold, will, state, futur, polic, world, uncertainti, violenc, crime, worri, crossroad, pull, safe, whether, children, next, threat, direct, victim, there, paycheck, care, that, stop, current, everi, differ, sure, path
Lift: crossroad, economi, powerless, racist, uncertainti, crime, victim, pull, paycheck, grow, concern, happen, polic, safe, hold, mistreat, brutal, next, threat, violenc, scari, street, children, stop, stori, state, path, will, turmoil, direct
Score: economi, worri, will, polic, futur, happen, world, biggest, state, uncertainti, hold, crime, violenc, threat, moment, sourc, victim, children, crossroad, whether, safe, pull, direct, next, kill, stress, brutal, sure, paycheck, current
Topic 23 Top Words:
Highest Prob: lot, stress, can, deal, person, overwhelm, time, life, work, issu, anxieti, cope, difficult, one, caus, balanc, divorc, manag, differ, lead, someth, high, frustrat, probabl, put, quit, stressor, juggl, weigh, outsid
FREX: deal, lot, balanc, person, anxieti, difficult, issu, divorc, manag, cope, can, lead, overwhelm, worklif, major, stress, field, quit, process, high, overal, juggl, task, time, probabl, stressor, handl, outsid, differ, competit
Lift: task, major, field, process, worklif, overal, difficult, manag, balanc, divorc, anxieti, deal, competit, juggl, overwhelm, lead, cope, especi, issu, stressor, outsid, eas, handl, proper, million, high, latina, employ, primari, person
Score: major, stress, deal, overwhelm, can, issu, lot, difficult, person, cope, anxieti, balanc, lead, divorc, manag, field, caus, stressor, worklif, process, high, quit, juggl, probabl, competit, weigh, differ, work, outsid, time
Topic 24 Top Words:
Highest Prob: keep, cant, seem, break, everyth, like, tri, just, catch, alway, hard, head, water, feel, ever, your, behind, late, time, someth, tough, peopl, give, life, relax, work, best, someon, tread, around
FREX: break, keep, catch, seem, water, head, everyth, tri, your, cant, ever, tread, give, drown, pleas, behind, harder, schoolwork, done, best, energi, sibl, hard, week, someon, alway, verg, tough, drama, tabl
Lift: drama, drown, tabl, schoolwork, slowli, break, pleas, catch, water, head, your, keep, tread, harder, week, hospit, breakdown, done, outgo, tri, sibl, certain, store, student, give, sick, ever, colleg, harass, pile
Score: break, keep, catch, tabl, seem, cant, water, everyth, head, tri, your, just, alway, ever, drown, tread, harder, pleas, behind, drama, sibl, relax, done, hard, schoolwork, give, week, colleg, slowli, juggl
Topic 25 Top Words:
Highest Prob: feel, isol, overwhelm, may, depress, lone, anxious, like, thing, futur, mani, make, respons, sad, caus, past, pain, anyon, part, fatigu, recent, ill, whatev, understood, experienc, hopeless, physic, helpless, other, dont
FREX: isol, may, anxious, overwhelm, lone, past, sad, fatigu, pain, respons, understood, recent, part, whatev, feel, mani, experienc, futur, depress, anyon, helpless, goal, hopeless, thing, physic, other, loss, caus, make, financ
Lift: fatigu, isol, understood, past, may, anxious, pain, sad, condit, symptom, recent, whatev, overwhelm, experienc, lone, loss, financ, part, specif, goal, respons, worthless, physic, mani, disappoint, helpless, reason, contribut, hopeless, difficult
Score: fatigu, isol, may, overwhelm, lone, anxious, respons, sad, past, pain, whatev, feel, depress, mani, condit, physic, understood, thing, futur, experienc, recent, symptom, part, loss, caus, specif, financ, anyon, difficult, cope
labelTopics(model_depression, n = 30)
findThoughts(model_depression, texts = survey_meta$text,topics = 4)# plots cloud of most important words
Topic 4:
I am feeling depressed because I feel like I am not living up to my full potential. I feel like I am not doing anything with my life that is meaningful or important. I feel like I am just going through the motions day after day and that my life has no purpose.
I am depressed because I feel like I am not living up to my potential. I feel like I am not doing anything with my life that is meaningful or important. I feel like I am just going through the motions and not really living.
I am feeling depressed because I feel like I am not doing anything with my life. I feel like I am not accomplishing anything and that my life has no purpose.
labelTopics(model_depression, topics = 25, n=30)
Topic 25 Top Words:
Highest Prob: feel, isol, overwhelm, may, depress, lone, anxious, like, thing, futur, mani, make, respons, sad, caus, past, pain, anyon, part, fatigu, recent, ill, whatev, understood, experienc, hopeless, physic, helpless, other, dont
FREX: isol, may, anxious, overwhelm, lone, past, sad, fatigu, pain, respons, understood, recent, part, whatev, feel, mani, experienc, futur, depress, anyon, helpless, goal, hopeless, thing, physic, other, loss, caus, make, financ
Lift: fatigu, isol, understood, past, may, anxious, pain, sad, condit, symptom, recent, whatev, overwhelm, experienc, lone, loss, financ, part, specif, goal, respons, worthless, physic, mani, disappoint, helpless, reason, contribut, hopeless, difficult
Score: fatigu, isol, may, overwhelm, lone, anxious, respons, sad, past, pain, whatev, feel, depress, mani, condit, physic, understood, thing, futur, experienc, recent, symptom, part, loss, caus, specif, financ, anyon, difficult, cope
findThoughts(model_depression, texts = survey_meta$text,topics = 25)# plots cloud of most important words
Error in findThoughts(model_depression, texts = survey_meta$text, topics = 25) :
Number of provided texts and number of documents modeled do not match
prep_gender <- stm::estimateEffect(~ gender,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_eth <- stm::estimateEffect(~ race,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_w_vs <- stm::estimateEffect(~ w_vs,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
Error in model.frame.default(termobj, data = metadata) :
object is not a matrix
# topics <- c("finances, relationships", "feeling stuck", "politics and news","talent and success?", "high pressure from work", "work life balance", "police brutality??", "stressors related to asian indiv", "finance and stress from job", "racism, discrimination", "feeling inadequate, comparing to others", "???-1", "loneliness and isolation","insecurities rooted in prejudice", "feeling aimless, lack of purpose", "family, stressors related to hispanic indiv", "providing for family", "words to describe mental state?", "mental health", "frustration, physical reactions", " mistakes, disappointment, probing your worth", "???-2", "stress related to manual labor", "Lack of control", "sexism, racism, money")
# topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "???9", "pressure form job", "unemployment", "racism", "???13", "work relatonship", "ovewhelmed from work", "???16", "helplessness", "???18", "???19", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "pressure form job", "unemployment", "racism", "work relatonship", "ovewhelmed from work", "helplessness", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topic_names = c(1,2,3,4,5,6,7,8,10,11,12,14,15,17,20,21,22,23,24,25)
plot(model_depression, type = "summary", xlim = c(0, 0.3))
plot(prep_gender, covariate = "gender", model = model_depression, method = "difference",
cov.value1 = "Male", cov.value2 = "Female",
xlab = "More Female ... More Male",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.1, 0.1),
topics = topic_names,
main = "Effect of Gender")
NA
NA
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "White", cov.value2 = "PoC",
xlab = "More PoC ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.05, 0.05),
ylim = c(0, 20),
topics = topic_names,
main = "Effect of Race")
Error in sims[1, ] : subscript out of bounds
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "black",
xlab = "More African American ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "asian",
xlab = "More Asian ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "hispanic",
xlab = "More hispanic ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
NA
NA
This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
## Installs
install.packages("stm")
install.packages("quanteda")
install.packages("spacyr")
install.packages("wordcloud")
## Imports
library(jsonlite)
library(stm)
library(quanteda)
library(spacyr)
library(stringr)
library(wordcloud)
library(ggplot2)
gender_func <- function(gender_label){
if(gender_label == "woman"){
return("Female")
} else if(gender_label == "man") {
return("Male")
} else {
return("other")
}
}
w_vs <- function(eth_label){
if(eth_label == 'white'){
return("White")
} else {
return("Not White")
}
}
a_vs <- function(eth_label){
if(eth_label == 'asian'){
return("Asian")
} else {
return("Not Asian")
}
}
b_vs <- function(eth_label){
if(eth_label == 'black'){
return("African American")
} else {
return("Not African American")
}
}
h_vs <- function(eth_label){
if(eth_label == 'hispanic'){
return("Hispanic")
} else {
return("Not Hispanic")
}
}
# survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2345.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2_p4_p5_p6_p7.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p4_5_6_7.csv")
survey_meta$gender <- sapply(survey_meta$gender, gender_func)
# survey_meta$w_vs <- sapply(survey_meta$race, w_vs)
# survey_meta$a_vs <- sapply(survey_meta$race, a_vs)
# survey_meta$b_vs <- sapply(survey_meta$race, b_vs)
# survey_meta$h_vs <- sapply(survey_meta$race, h_vs)
# survey_meta <- survey_meta[, c("text", "gender", "race")]
summary(survey_meta)
head(survey_metagit merge origin)
sapply(lapply(survey_meta, unique), length)
processed <- textProcessor(survey_meta$text, metadata=survey_meta[, c( "gender", "race")])
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
sapply(lapply(processed$meta, unique), length)
temp_text <- survey_meta[-processed$docs.removed,]
length(temp_text)
model_depression_race <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + w_vs ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression_race_2 <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + race ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression <- stm::stm(
documents = out$documents,
K = 25,
prevalence =~ gender + race,
data=out$meta,
vocab = out$vocab,
max.em.its=75
)
labelTopics(model_depression_race_2, n = 30)
labelTopics(model_depression, n = 30)
labelTopics(model_depression, n = 30)
findThoughts(model_depression, texts = survey_meta$text,topics = 4)# plots cloud of most important words
labelTopics(model_depression, topics = 25, n=30)
findThoughts(model_depression, texts = survey_meta$text,topics = 25)# plots cloud of most important words
cloud(model_depression, 25)
# plotQuote(thoughts, width = 30, main = "Topic 2")
prep_gender <- stm::estimateEffect(~ gender,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_eth <- stm::estimateEffect(~ race,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_w_vs <- stm::estimateEffect(~ w_vs,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
# topics <- c("finances, relationships", "feeling stuck", "politics and news","talent and success?", "high pressure from work", "work life balance", "police brutality??", "stressors related to asian indiv", "finance and stress from job", "racism, discrimination", "feeling inadequate, comparing to others", "???-1", "loneliness and isolation","insecurities rooted in prejudice", "feeling aimless, lack of purpose", "family, stressors related to hispanic indiv", "providing for family", "words to describe mental state?", "mental health", "frustration, physical reactions", " mistakes, disappointment, probing your worth", "???-2", "stress related to manual labor", "Lack of control", "sexism, racism, money")
# topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "???9", "pressure form job", "unemployment", "racism", "???13", "work relatonship", "ovewhelmed from work", "???16", "helplessness", "???18", "???19", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "pressure form job", "unemployment", "racism", "work relatonship", "ovewhelmed from work", "helplessness", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topic_names = c(1,2,3,4,5,6,7,8,10,11,12,14,15,17,20,21,22,23,24,25)
plot(model_depression, type = "summary", xlim = c(0, 0.3))
plot(prep_gender, covariate = "gender", model = model_depression, method = "difference",
cov.value1 = "Male", cov.value2 = "Female",
xlab = "More Female ... More Male",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.1, 0.1),
topics = topic_names,
main = "Effect of Gender")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "White", cov.value2 = "PoC",
xlab = "More PoC ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.05, 0.05),
ylim = c(0, 20),
topics = topic_names,
main = "Effect of Race")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "black",
xlab = "More African American ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "asian",
xlab = "More Asian ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "hispanic",
xlab = "More hispanic ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
toLDAvis(model_depression, out$documents)
install.packages("LDAvis")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "black",
xlab = "More African American ... More Asian",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "hispanic", cov.value2 = "black",
xlab = "More African American ... More Hispanic",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "black",
xlab = "More African American ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
)
NA
NA
This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
## Installs
install.packages("stm")
install.packages("quanteda")
install.packages("spacyr")
install.packages("wordcloud")
## Imports
library(jsonlite)
library(stm)
library(quanteda)
library(spacyr)
library(stringr)
library(wordcloud)
library(ggplot2)
gender_func <- function(gender_label){
if(gender_label == "woman"){
return("Female")
} else if(gender_label == "man") {
return("Male")
} else {
return("other")
}
}
w_vs <- function(eth_label){
if(eth_label == 'white'){
return("White")
} else {
return("Not White")
}
}
a_vs <- function(eth_label){
if(eth_label == 'asian'){
return("Asian")
} else {
return("Not Asian")
}
}
b_vs <- function(eth_label){
if(eth_label == 'black'){
return("African American")
} else {
return("Not African American")
}
}
h_vs <- function(eth_label){
if(eth_label == 'hispanic'){
return("Hispanic")
} else {
return("Not Hispanic")
}
}
# survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2345.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2_p4_p5_p6_p7.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p4_5_6_7.csv")
survey_meta$gender <- sapply(survey_meta$gender, gender_func)
# survey_meta$w_vs <- sapply(survey_meta$race, w_vs)
# survey_meta$a_vs <- sapply(survey_meta$race, a_vs)
# survey_meta$b_vs <- sapply(survey_meta$race, b_vs)
# survey_meta$h_vs <- sapply(survey_meta$race, h_vs)
# survey_meta <- survey_meta[, c("text", "gender", "race")]
summary(survey_meta)
head(survey_metagit merge origin)
sapply(lapply(survey_meta, unique), length)
processed <- textProcessor(survey_meta$text, metadata=survey_meta[, c( "gender", "race")])
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
sapply(lapply(processed$meta, unique), length)
temp_text <- survey_meta[-processed$docs.removed,]
length(temp_text)
model_depression_race <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + w_vs ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression_race_2 <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + race ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression <- stm::stm(
documents = out$documents,
K = 25,
prevalence =~ gender + race,
data=out$meta,
vocab = out$vocab,
max.em.its=75
)
labelTopics(model_depression_race_2, n = 30)
labelTopics(model_depression, n = 30)
labelTopics(model_depression, n = 30)
findThoughts(model_depression, texts = survey_meta$text,topics = 4)# plots cloud of most important words
labelTopics(model_depression, topics = 25, n=30)
findThoughts(model_depression, texts = survey_meta$text,topics = 25)# plots cloud of most important words
cloud(model_depression, 25)
# plotQuote(thoughts, width = 30, main = "Topic 2")
prep_gender <- stm::estimateEffect(~ gender,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_eth <- stm::estimateEffect(~ race,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_w_vs <- stm::estimateEffect(~ w_vs,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
# topics <- c("finances, relationships", "feeling stuck", "politics and news","talent and success?", "high pressure from work", "work life balance", "police brutality??", "stressors related to asian indiv", "finance and stress from job", "racism, discrimination", "feeling inadequate, comparing to others", "???-1", "loneliness and isolation","insecurities rooted in prejudice", "feeling aimless, lack of purpose", "family, stressors related to hispanic indiv", "providing for family", "words to describe mental state?", "mental health", "frustration, physical reactions", " mistakes, disappointment, probing your worth", "???-2", "stress related to manual labor", "Lack of control", "sexism, racism, money")
# topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "???9", "pressure form job", "unemployment", "racism", "???13", "work relatonship", "ovewhelmed from work", "???16", "helplessness", "???18", "???19", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "pressure form job", "unemployment", "racism", "work relatonship", "ovewhelmed from work", "helplessness", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topic_names = c(1,2,3,4,5,6,7,8,10,11,12,14,15,17,20,21,22,23,24,25)
plot(model_depression, type = "summary", xlim = c(0, 0.3))
plot(prep_gender, covariate = "gender", model = model_depression, method = "difference",
cov.value1 = "Male", cov.value2 = "Female",
xlab = "More Female ... More Male",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.1, 0.1),
topics = topic_names,
main = "Effect of Gender")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "White", cov.value2 = "PoC",
xlab = "More PoC ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.05, 0.05),
ylim = c(0, 20),
topics = topic_names,
main = "Effect of Race")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "black",
xlab = "More African American ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "asian",
xlab = "More Asian ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "hispanic",
xlab = "More hispanic ... More white",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
## Installs
install.packages("stm")
install.packages("quanteda")
install.packages("spacyr")
install.packages("wordcloud")
## Imports
library(jsonlite)
library(stm)
library(quanteda)
library(spacyr)
library(stringr)
library(wordcloud)
library(ggplot2)
gender_func <- function(gender_label){
if(gender_label == "woman"){
return("Female")
} else if(gender_label == "man") {
return("Male")
} else {
return("other")
}
}
w_vs <- function(eth_label){
if(eth_label == 'white'){
return("White")
} else {
return("Not White")
}
}
a_vs <- function(eth_label){
if(eth_label == 'asian'){
return("Asian")
} else {
return("Not Asian")
}
}
b_vs <- function(eth_label){
if(eth_label == 'black'){
return("African American")
} else {
return("Not African American")
}
}
h_vs <- function(eth_label){
if(eth_label == 'hispanic'){
return("Hispanic")
} else {
return("Not Hispanic")
}
}
# survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2345.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p2_p4_p5_p6_p7.csv")
survey_meta <- read.csv("/Users/shinkamori/Documents/Research/p4_5_6_7.csv")
survey_meta$gender <- sapply(survey_meta$gender, gender_func)
# survey_meta$w_vs <- sapply(survey_meta$race, w_vs)
# survey_meta$a_vs <- sapply(survey_meta$race, a_vs)
# survey_meta$b_vs <- sapply(survey_meta$race, b_vs)
# survey_meta$h_vs <- sapply(survey_meta$race, h_vs)
# survey_meta <- survey_meta[, c("text", "gender", "race")]
summary(survey_meta)
head(survey_metagit merge origin)
sapply(lapply(survey_meta, unique), length)
processed <- textProcessor(survey_meta$text, metadata=survey_meta[, c( "gender", "race")])
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
sapply(lapply(processed$meta, unique), length)
temp_text <- survey_meta[-processed$docs.removed,]
length(temp_text)
model_depression_race <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + w_vs ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression_race_2 <- stm::stm(
documents = out_race$documents,
K = 25,
prevalence =~ gender + race ,
data=out_race$meta,
vocab = out_race$vocab,
max.em.its=75
)
model_depression <- stm::stm(
documents = out$documents,
K = 25,
prevalence =~ gender + race,
data=out$meta,
vocab = out$vocab,
max.em.its=75
)
labelTopics(model_depression_race_2, n = 30)
labelTopics(model_depression, n = 30)
labelTopics(model_depression, n = 30)
findThoughts(model_depression, texts = survey_meta$text,topics = 4)# plots cloud of most important words
labelTopics(model_depression, topics = 25, n=30)
findThoughts(model_depression, texts = survey_meta$text,topics = 25)# plots cloud of most important words
cloud(model_depression, 25)
# plotQuote(thoughts, width = 30, main = "Topic 2")
prep_gender <- stm::estimateEffect(~ gender,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_eth <- stm::estimateEffect(~ race,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
prep_w_vs <- stm::estimateEffect(~ w_vs,
model_depression,
meta = survey_meta[, c( "gender", "race")], uncertainty = "Global")
# topics <- c("finances, relationships", "feeling stuck", "politics and news","talent and success?", "high pressure from work", "work life balance", "police brutality??", "stressors related to asian indiv", "finance and stress from job", "racism, discrimination", "feeling inadequate, comparing to others", "???-1", "loneliness and isolation","insecurities rooted in prejudice", "feeling aimless, lack of purpose", "family, stressors related to hispanic indiv", "providing for family", "words to describe mental state?", "mental health", "frustration, physical reactions", " mistakes, disappointment, probing your worth", "???-2", "stress related to manual labor", "Lack of control", "sexism, racism, money")
# topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "???9", "pressure form job", "unemployment", "racism", "???13", "work relatonship", "ovewhelmed from work", "???16", "helplessness", "???18", "???19", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topics <- c("making mistakes", "relationship", "working long hours", "helplessness", "race words", "finances - family", "family - tradition", "comparing to others", "pressure form job", "unemployment", "racism", "work relatonship", "ovewhelmed from work", "helplessness", "fighting discrimination", "physical stress", "concern for future", "stress", "overworked", "loneliness")
topic_names = c(1,2,3,4,5,6,7,8,10,11,12,14,15,17,20,21,22,23,24,25)
plot(model_depression, type = "summary", xlim = c(0, 0.3))
plot(prep_gender, covariate = "gender", model = model_depression, method = "difference",
cov.value1 = "Male", cov.value2 = "Female",
xlab = "More Female ... More Male",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.1, 0.1),
topics = topic_names,
main = "Effect of Gender")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "White", cov.value2 = "PoC",
xlab = "More PoC ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.05, 0.05),
ylim = c(0, 20),
topics = topic_names,
main = "Effect of Race")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "black", cov.value2 = "white",
xlab = "More White ... More African American",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "white",
xlab = "More White ... More Asian",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "hispanic", cov.value2 = "white",
xlab = "More White ... More Hispanic",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
NA
NA
toLDAvis(model_depression, out$documents)
install.packages("LDAvis")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "black",
xlab = "More African American ... More Asian",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "hispanic", cov.value2 = "black",
xlab = "More African American ... More Hispanic",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
topics = topic_names
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "black",
xlab = "More African American ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
topics = topic_names
)
NA
NA
topicQuality(
model_depression,
out$documents,
xlab = "Semantic Coherence",
ylab = "Exclusivity",
labels = topics,
M = 20
)
e Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
toLDAvis(model_depression, out$documents)
install.packages("LDAvis")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "hispanic",
xlab = "More Hispanic ... More Asian",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "black", cov.value2 = "hispanic",
xlab = "More Hispanic ... More African American",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
topics = topic_names,
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "hispanic",
xlab = "More Hispanic ... More White",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.20, 0.20),
topics = topic_names
)
NA
NA
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "white", cov.value2 = "asian",
xlab = "More Asian ... More White",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "black", cov.value2 = "asian",
xlab = "More Asian ... More African American",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "hispanic", cov.value2 = "asian",
xlab = "More Asian ... More Hispanic",
labeltype = "custom",
custom.labels = topics,
topics = topic_names,
xlim = c(-0.20, 0.20),
)
(semanticCoherence(model_depression, out$documents, M = 30))
topicQuality(
model_depression,
out$documents,
xlab = "Semantic Coherence",
ylab = "Exclusivity",
labels = topics,
M = 20
)
e Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
topicQuality(
model_depression,
out$documents,
xlab = "Semantic Coherence",
ylab = "Exclusivity",
labels = topics,
M = 20
)
e Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
toLDAvis(model_depression, out$documents)
install.packages("LDAvis")
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "black",
xlab = "More African American ... More Asian",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.10, 0.10),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "hispanic", cov.value2 = "black",
xlab = "More African American ... More Hispanic",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.10, 0.10),
)
plot(prep_eth, covariate = "race", model = model_depression, method = "difference",
cov.value1 = "asian", cov.value2 = "hispanic",
xlab = "More hispanic ... More Asian",
labeltype = "custom",
custom.labels = topics,
xlim = c(-0.10, 0.10),
)
(semanticCoherence(model_depression, out$documents, M = 30))
topicQuality(
model_depression,
out$documents,
xlab = "Semantic Coherence",
ylab = "Exclusivity",
labels = topics,
M = 20
)
e Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.